package com.ruoyi.jxxwx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.jxxwx.mapper.JxxPlaceMapper;
import com.ruoyi.jxxwx.domain.JxxPlace;
import com.ruoyi.jxxwx.service.IJxxPlaceService;

/**
 * 场所信息Service业务层处理
 * 
 * @author wh
 * @date 2025-04-10
 */
@Service
public class JxxPlaceServiceImpl implements IJxxPlaceService 
{
    @Autowired
    private JxxPlaceMapper jxxPlaceMapper;

    /**
     * 查询场所信息
     * 
     * @param placeId 场所信息主键
     * @return 场所信息
     */
    @Override
    public JxxPlace selectJxxPlaceByPlaceId(Long placeId)
    {
        return jxxPlaceMapper.selectJxxPlaceByPlaceId(placeId);
    }

    /**
     * 查询场所信息列表
     * 
     * @param jxxPlace 场所信息
     * @return 场所信息
     */
    @Override
    public List<JxxPlace> selectJxxPlaceList(JxxPlace jxxPlace)
    {
        return jxxPlaceMapper.selectJxxPlaceList(jxxPlace);
    }

    /**
     * 新增场所信息
     * 
     * @param jxxPlace 场所信息
     * @return 结果
     */
    @Override
    public int insertJxxPlace(JxxPlace jxxPlace)
    {
        jxxPlace.setCreateTime(DateUtils.getNowDate());
        return jxxPlaceMapper.insertJxxPlace(jxxPlace);
    }

    /**
     * 修改场所信息
     * 
     * @param jxxPlace 场所信息
     * @return 结果
     */
    @Override
    public int updateJxxPlace(JxxPlace jxxPlace)
    {
        jxxPlace.setUpdateTime(DateUtils.getNowDate());
        return jxxPlaceMapper.updateJxxPlace(jxxPlace);
    }

    /**
     * 批量删除场所信息
     * 
     * @param placeIds 需要删除的场所信息主键
     * @return 结果
     */
    @Override
    public int deleteJxxPlaceByPlaceIds(Long[] placeIds)
    {
        return jxxPlaceMapper.deleteJxxPlaceByPlaceIds(placeIds);
    }

    /**
     * 删除场所信息信息
     * 
     * @param placeId 场所信息主键
     * @return 结果
     */
    @Override
    public int deleteJxxPlaceByPlaceId(Long placeId)
    {
        return jxxPlaceMapper.deleteJxxPlaceByPlaceId(placeId);
    }
}
